@echo off
setlocal ENABLEDELAYEDEXPANSION

for /l %%i in (1,1,5) do (

    set var=%%i

    echo !var!

)